import { type MockMethod, type MockConfig } from 'vite-plugin-mock'
import jwt from 'jsonwebtoken'



export default [{
    url: '/api/user/login',
    method: 'get',

    response: ({ query }) => {
        console.log('query :', query)
        return {
            code:200,
            msg:'操作成功',
            data: jwt.sign({
                name: 'admin',
                exp: Math.floor(Date.now() / 1000) + (60 * 60 * 24 * 7),
            }, 'secret')
        }
    },
},

] as MockMethod[]

